package com.wontube.smr.web.client;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.smr.client.model.vo.MovieItems;
import com.wontube.smr.client.model.vo.SearchCountPreview;
import com.wontube.smr.client.model.vo.TVShowItems;
import com.wontube.smr.client.model.vo.VVideoItems;

/**
 * search video
 * @author tanggf(2012-8-11)
 *
 */
public interface IVideoSearchWebHandler {
	/**
	 * every type search result count preview
	 * @param query
	 * @return
	 */
	SearchCountPreview getSearchCountPreview(String query);
	
	/**
	 * search from youtube and  v_video table (without website='Crunchyroll')
	 * @param dbFactor
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	VVideoItems searchAllVideos(double dbFactor, String query, PagenateInfo pageInfo);
	
	/**
	 * search from youtube and  movie table with movie_type='Movie'
	 * @param dbFactor
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchMovies(String query, PagenateInfo pageInfo);
	
	/**
	 * search from movie table with movie_type='Trailer'
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchTrailers(String query, PagenateInfo pageInfo);
	
	/**
	 * search from movie table with movie_type='Music'
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchMusics(String query, PagenateInfo pageInfo);
	
	/**
	 * search video from youtube api
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchYoutubeShortFilms(String query, PagenateInfo pageInfo);
	
	/**
	 * search hulu tv show
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	TVShowItems searchHuluTVShows(String query, PagenateInfo pageInfo);
	
	
	//======i18n
	/**
	 * for i18n
	 * @param query
	 * @return
	 */
	SearchCountPreview getI18nSearchCountPreview(String query);
	
	/**
	 * music,movie from youtube; trailer from Imdb, anime from Crunchyroll; short film from youtube api
	 * @param dbFactor
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	VVideoItems searchAllVideosForI18n(double dbFactor, String query, PagenateInfo pageInfo);
	
	/**
	 * search movie from youtube
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchMoviesForI18n(String query, PagenateInfo pageInfo);
	
	/**
	 * search trailer from Imdb
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchTrailersForI18n(String query, PagenateInfo pageInfo);
	
	/**
	 * search anime from crunchyroll
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	TVShowItems seachAnimesForI18n(String query, PagenateInfo pageInfo);
	
	/**
	 * search musics from youtube
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchMusicsForI18n(String query, PagenateInfo pageInfo);
}
